package com.vic.test.designpattern._3singletonpattern;

//懒汉式单例模式：在类加载时不初始化。
public class SingletonLazyNotSafe {//懒汉，线程不安全
    private static SingletonLazyNotSafe instance;
    private SingletonLazyNotSafe(){}
    public static SingletonLazyNotSafe getInstance(){
        if (instance == null) {
            instance = new SingletonLazyNotSafe();
        }
        return instance;
    }

}
